{extend name="public:_base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/uploadify/uploadify.css">
{/block}
{block name="js"}
{include file="public/_validform"}
{load href="__STATIC__/admin/hui/lib/My97DatePicker/4.8/WdatePicker.js" /}
<!--上传配置 -->
<script src="__STATIC__/admin/uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/upfile.js" type="text/javascript"></script>

<!-- 配置文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/admin/hui/lib/ueditor/1.4.3/ueditor.all.js"></script>

<script type="text/javascript">
    var ue = UE.getEditor('editor');
    $("[name='status'][value='{$data.status ?? ''}']").attr("checked", true);

    $("[name='cid']").find("[value='{$data.cid ?? ''}']").attr("selected", true);
    $("[name='cid']").find("[value='{$data.cid ?$data.cid :$Request.param.addcid }']").attr("selected", true);

    upload_image('image','','200','200','500');
    var URL = {
        uploader: '{:url('Upload/image')}',
        swf:'__STATIC__/admin/uploadify/uploadify.swf',
        ROOT:'__PUBLIC__/uploads/image',
        del_url:'{:url('Product/delimage')}',
    }
</script>
{/block}
{block name="main"}
<div class="page-container">

    <form class="form form-horizontal" action="{:url(\''.\\think\\Request::instance()->controller().'/save')}" id="form" method="post">

        <table class="table table-border table-bordered table-bg table-style">
            <thead>
                <tr>
                    <th colspan="2" scope="col">填写信息</th>
                </tr>
            </thead>

            <tbody>
            {include file="public:_navadd"}

                <tr>
                    <th>
                        <span class="c-red">*</span>供应标题：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.title ?? ''}" placeholder="标题"  datatype="*" name="title">
                    </td>
                </tr>

                <!--
                <tr>
                    <th>
                        <span class="c-red">*</span>排序值：
                    </th>
                    <td>
                        <input type="number" class="input-text" value="{$data.sort ?? ''}" placeholder="排序值" name="sort">
                        <div style="font-size: 14px;float: left;margin: 5px 0 0 0;">
                            <span class="c-red">*</span>  不填写, 默认排序为最高
                        </div>
                    </td>
                </tr>
                -->

                <tr>
                    <th>
                        <span class="c-red">*</span>价格：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.price ?? ''}" placeholder="价格" datatype="*" name="price">
                    </td>
                </tr>

                <tr>
                    <th>
                        <span class="c-red">*</span>时间：
                    </th>
                    <td>
                        <input type="input" class="input-text"  value="{$data.time|default='0'|date="Y-m-d H:i:s",###}" onClick="selecttime(1)" name="time" placeholder="时间"/>
                    </td>
                </tr>

                <tr>
                    <th>
                        <span class="c-red">*</span>供应摘要：
                    </th>
                    <td class="textarea-valid">
                        <textarea name="miaoshu" cols="" rows="" class="input-text textarea" placeholder="说点什么...最少输入10个字符" datatype="*10-100" dragonfly="true" nullmsg="限制10-100个字符!">{$data.miaoshu ?? ''}</textarea>
                    </td>
                </tr>

                <tr>
                    <th>
                        供应作者：
                    </th>
                    <td>
                        <input type="text" class="input-text" value="{$data.issue ?? ''}" placeholder="供应作者"  name="issue">
                    </td>
                </tr>

                <tr>
                    <th>
                        <span class="c-red">*</span>供应内容：
                    </th>
                    <td>
                        <script id="editor" type="text/plain" name="center" style="width:100%;height:400px;">{$data.center|default=''|html_entity_decode ?? ''}</script>
                    </td>
                </tr>

                <tr>
                    <th>
                        审核：
                    </th>
                    <td>
                        <div class="radio-box" style="padding-left: 0;">
                            <input type="radio" name="status" id="radio-0" value="1">
                            <label for="radio-0">通过</label>
                        </div>

                        <div class="radio-box">
                            <input type="radio" name="status" id="radio-1" value="2">
                            <label for="radio-1">不通过</label>
                        </div>
                    </td>
                </tr>
            </tbody>

            <tfoot>
                <tr>
                    <th></th>
                    <td>
                        <input name="id" value="{$data.id ?? ''}" type="hidden">
                        <input type="hidden" value="{$data.cid ?? $addcid}" name="cidold" />

                        <input name="type" value="one" type="hidden">
                        <input name="model" value="about" type="hidden">
                        <input id="pids" name="pids" value="{$data.pids ?? ','}" type="hidden">
                        {:token()}
                        <input class="btn radius btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
                    </td>
                </tr>
            </tfoot>

        </table>

    </form>
</div>
{/block}